package
{
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	import flash.utils.getDefinitionByName;

	public function csAttachMovie(container:DisplayObjectContainer, id:String, name:String, depth:int):MovieClip
	{
		trace("csAttachMovie.csAttachMovie");

		var cls:Class = getDefinitionByName(id) as Class;
		var mc:MovieClip = new cls();
		mc.name = name;
		container[name] = mc;
		csAddToContainer(container, mc, depth);
		return mc;
		
		
	}


}